<?php

require_once "core/application/models/mchangelogin/mchangelogin5.php";

class Mchangelogin6 extends Mchangelogin5 {

    private $_fetch = array();

    protected function isOnlineOneChar() {
        DB::getInstance()->openConnectionToGS();
        $infos = $this->getCharsInfos();
        $this->_fetch = mysql_fetch_assoc($infos);
        do {
            foreach ($this->_fetch as $key => $val) {
                if ($key == 'online' && $val == '1') {
                    return true;
                } else {
                    return false;
                }
            }
        } while ($this->_fetch = mysql_fetch_assoc($infos));
        DB::getInstance()->closeConnection();
        unset($this->_fetch);
    }

}

?>
